<?php
namespace app\api\controller\wanlshop;

use app\common\controller\Api;

/**
 * WanlShop轮播图接口
 */
class Banner extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * @param mixed $arg1
     * @author xusir
     * @date: 2023/5/15
     * @createTime: 16:59
     * @remark:获取轮播图列表
     */
    public function GetList(){
           $model = new \app\admin\model\wanlshop\Banner();
           $list = collection($model->order('id','desc')->select())->toArray();
           if($list){
                foreach($list as $k=>$v){
                       $list[$k]['img'] = self::combination($v['img']);
                }
           }
        $this->success('返回成功', $list);
    }

    /**
     * @param mixed $arg1
     * @author xusir
     * @date: 2023/5/15
     * @createTime: 17:34
     * @remark:公告
     */
    public function getNotice(){
        $model = new \app\admin\model\wanlshop\Affiche();
        $list = collection($model->select())->toArray();
        $this->success('返回成功', $list);
    }




}
